package com.consumer.client.impl;

import com.consumer.client.ProducerFeign;
import com.consumer.entity.UserEneity;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class ProducerFeignImplHystrix implements ProducerFeign {
    @Override
    public List<UserEneity> getAll() {
        sendEmail();
        //返回一个空的数组,防止调用方报错,不至于影响到其他功能的使用
        return new ArrayList<UserEneity>();
    }

    public void sendEmail(){
        System.out.println("发送邮件通知管理员,进行处理");

    }

}